package cz.vargagab.mvc;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.AbstractController;

import cz.vargagab.domain.ClientRmiNode;
import cz.vargagab.repo.InternalClientService;

@Controller
public class LogReportController extends AbstractController{
	 
	@Autowired
	InternalClientService internalClientService;

	@Override
	@RequestMapping("/report")
	protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception {
		return new ModelAndView("pdfView","logs",internalClientService.getLog());
	}	
	
	public InternalClientService getInternalClientService() {
		return internalClientService;
	}
	public void setInternalClientService(InternalClientService internalClientService) {
		this.internalClientService = internalClientService;
	}
	
}